<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<TemplateWeb.Models.ViewModels.GroupViewModel>" %>
<div class="AdminPageText">
List Of NguoiDung
</div>
<table class="Grid" cellpadding="0" cellspacing="0">
	<thead>
		<tr>
			<th>UserName</th>
			<th>Email</th>
			<th>Role</th>
			<th></th>
			<th></th>
		<tr>
	</thead>
	<% for (int i=0; i<Model.NguoiDungModel.GetModel.LstObjModel.Count; i++){
		if (i % 2 != 0) {%>
		<tr class="Row" id="row-<%= Model.NguoiDungModel.GetModel.LstObjModel[i].BaseInfo.ID %>">
		<% }
		else { %>
		<tr class="AlternatingRow" id="row-<%= Model.NguoiDungModel.GetModel.LstObjModel[i].BaseInfo.ID %>">
		<% } %>
			<td><span style=""><%= Model.NguoiDungModel.GetModel.LstObjModel[i].BaseInfo.UserName %></span></td>
			<td><span style=""><%= Model.NguoiDungModel.GetModel.LstObjModel[i].BaseInfo.Email %></span></td>
			<td><span style=""><%= Model.NguoiDungModel.GetModel.LstObjModel[i].BaseInfo.Role %></span></td>
			<td>
				<a href="../../Admin/DetailOfNguoiDung?id=<%= Model.NguoiDungModel.GetModel.LstObjModel[i].BaseInfo.ID %>">
				<span style="color: Blue; text-decoration: underline">Select</span>
				</a>
			</td>
			<td>
				<%= Ajax.ActionLink("Delete", "DeleteNguoiDung", "Admin", new { id = Model.NguoiDungModel.GetModel.LstObjModel[i].BaseInfo.ID, role = Roles.GetRolesForUser(Page.User.Identity.Name)[0] }, new AjaxOptions{Confirm = "Are you sure you want to Delete it? This action cannot be undone.", HttpMethod = "Delete", OnComplete = "jsonDelete_OnComplete"})%>
			</td>
		</tr>
	<% } %>  
</table>
